<template>
  <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" :close-on-click-modal="false" :visible.sync="visible" class="cu-dialog cu-dialog_center" lock-scroll width="1000px">
    <el-row :gutter="15" class="">
      <el-form ref="elForm" :model="dataForm" size="small" label-width="120px" label-position="right" :disabled="!!isDetail" :rules="rules">
        <el-col :span="12">
          <el-form-item label="收款品牌" prop="brand">
            <el-select v-model="dataForm.brand" placeholder="请选择收款品牌" clearable required :style="{ width: '100%' }">
              <el-option v-for="(item, index) in brandOptions" :key="index" :label="item.fullName" :value="item.enCode"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="客户信息" prop="customerName">
            <el-input v-model="dataForm.customerName" :style="{ width: '100%' }" readonly></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="意向学校" prop="school">
            <el-input v-model="dataForm.school" placeholder="请输入意向小学/中学" clearable :style="{ width: '100%' }"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="所在区域" prop="area">
            <custom-address v-model="dataForm.area" clearable required :styleWidth="{ width: '100%' }"></custom-address>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="招商经理" prop="managerId">
            <el-select v-model="dataForm.managerId" placeholder="请选择招商经理" clearable required :style="{ width: '100%' }">
              <el-option :key="item.id" :label="item.realName" :value="item.id" v-for="item in managerIdOptions" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="加盟政策" prop="contractPolicy">
            <el-input v-model="dataForm.contractPolicy" placeholder="请输入加盟政策" clearable required :style="{ width: '100%' }"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取 消</el-button>
      <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.el-time-spinner__wrapper {
  width: 100% !important;
}
@import url(index.scss);
</style>
